Skip to content

[VL] Support Cast between TIMESTAMP and TIMESTAMP_NTZ - #12654

Open
Mariamalmesfer wants to merge 1 commit into
apache:mainfrom
Mariamalmesfer:ts-ntz-cast-timestamp-utc-support
Open

[VL] Support Cast between TIMESTAMP and TIMESTAMP_NTZ#12654
Mariamalmesfer wants to merge 1 commit into
apache:mainfrom
Mariamalmesfer:ts-ntz-cast-timestamp-utc-support

Conversation

@Mariamalmesfer

Copy link
Copy Markdown
Contributor

Enable CAST(timestamp AS timestamp_ntz) and CAST(timestamp_ntz AS timestamp)
to run natively in the Velox backend instead of falling back to Spark.

Velox PR: facebookincubator/velox#17920

@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions github-actions Bot added CORE works for Gluten Core VELOX labels Jul 29, 2026
@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-cast-timestamp-utc-support branch from 787883d to fcd4b69 Compare July 29, 2026 21:54
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-cast-timestamp-utc-support branch from fcd4b69 to 2501240 Compare August 3, 2026 10:54
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer

Copy link
Copy Markdown
Contributor Author

Hi @rui-mo, could you take a look when you get the chance? Thanks!

case Minute(child, _) => containsNTZ(child.dataType)
case Second(child, _) => containsNTZ(child.dataType)
case TimestampAdd(_, _, child, _) => containsNTZ(child.dataType)
case c: Cast if !containsNTZ(c.dataType) => containsNTZ(c.child.dataType)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would allow all non-timestamp_ntz types to be cast to timestamp_ntz. While I assume the supported cases are still limited. Could you please confirm?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's correct fixed required both guards to check TimestampType

@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-cast-timestamp-utc-support branch from 2501240 to cce03eb Compare August 5, 2026 09:54
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-cast-timestamp-utc-support branch from cce03eb to 554debc Compare August 5, 2026 11:38
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer

Copy link
Copy Markdown
Contributor Author

@rui-mo could you take another look? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE works for Gluten Core VELOX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants